<?php
/**
 * Niushop商城系统 - 团队十年电商经验汇集巨献!
 * =========================================================
 * Copy right 2019-2029 上海牛之云网络科技有限公司, 保留所有权利。
 * ----------------------------------------------
 * 官方网址: https://www.niushop.com

 * =========================================================
 */

namespace addon\printer\event;

use addon\printer\model\PrinterOrder;

/**
 * 打印社区团购配送单
 */
class PrintCommunityDeliveryOrder
{
    public function handle($params)
    {
        $delivery_id = $params['delivery_id'] ?? 0;

        if (!empty($delivery_id)) {

            $printer_order_model = new PrinterOrder();
            return $printer_order_model->printDelivery($delivery_id);
        }
    }
}